package services.impl;

import beans.Organ;
import dao.OrganDao;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import services.OrganServices;

import java.util.List;

@Service
public class OrganServicesImpl implements OrganServices {

    @Autowired
    private OrganDao organDao;


    @Override
    public List<Organ> selectSelective(String selectText, String inputText) {
        List<Organ> list = organDao.selectSelective(selectText, inputText);
        return list;
    }

    @Override
    public List<Organ> selectList() {
        List<Organ> list = organDao.selectList();
        return list;
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        int i = organDao.deleteByPrimaryKey(id);
        return i;
    }

    @Override
    public int insert(Organ record) {
        int i = organDao.insert(record);
        return i;
    }

    @Override
    public int insertSelective(Organ record) {
        int i = organDao.insertSelective(record);
        return i;
    }

    @Override
    public Organ selectByPrimaryKey(Integer id) {
        Organ organ = organDao.selectByPrimaryKey(id);
        return organ;
    }

    @Override
    public int updateByPrimaryKeySelective(Organ record) {
        int i = organDao.updateByPrimaryKeySelective(record);
        return i;
    }

    @Override
    public int updateByPrimaryKey(Organ record) {
        int i = organDao.updateByPrimaryKey(record);
        return i;
    }

    @Override
    public int count() {
        return organDao.count();
    }
}
